package com.quectel.core.module.alarm.dto;

import com.quectel.core.module.device.dto.DeviceDto;
import io.swagger.v3.oas.annotations.media.Schema;
import lombok.Data;

import java.io.Serializable;
import java.util.Date;

/**
 * @author caolu
 * @email louis.cao@quectel.com
 * @date 2021-10-19 13:39:01
 */
@Data
@Schema
public class AlarmEventRecordDto implements Serializable {

    /**
     * ID
     */
    @Schema(description = "ID")
    private Long id;

    /**
     * 租户id
     */
    @Schema(description = "租户id")
    private Long tenantId;

    /**
     * 小区id
     */
    @Schema(description = "小区id")
    private Long villageId;

    /**
     * 楼栋id
     */
    @Schema(description = "楼栋id")
    private Long buildingId;

    /**
     * 种类id
     */
    @Schema(description = "种类id")
    private Long deviceCategoryId;

    /**
     * 类型id
     */
    @Schema(description = "类型id")
    private Long deviceTypeId;

    /**
     * 设备id
     */
    @Schema(description = "设备id")
    private Long deviceId;

    /**
     * 设备imei
     */
    @Schema(description = "设备imei")
    private String imei;

    /**
     * 事件规则id
     */
    @Schema(description = "事件规则id")
    private Long eventConfigId;

    /**
     * 事件名称
     */
    @Schema(description = "事件名称")
    private String name;

    /**
     * 事件描述
     */
    @Schema(description = "事件描述")
    private String eventDesc;

    /**
     * 1处理中2已完成
     */
    @Schema(description = "1处理中2已完成")
    private Byte status;

    /**
     * 事件发生时间
     */
    @Schema(description = "事件发生时间")
    private Date eventTime;

    /**
     * 事件完成时间
     */
    @Schema(description = "事件完成时间")
    private Date finishTime;

    /**
     * 关联工单id
     */
    @Schema(description = "关联工单id")
    private Long workOrderId;

    /**
     * 是否自动关闭 1是 0否
     */
    @Schema(description = "是否自动关闭 1是 0否")
    private Byte isAutoClose;


    /**
     * 创建人
     */
    @Schema(description = "创建人")
    private String creator;

    /**
     * 创建时间
     */
    @Schema(description = "创建时间")
    private Date createTime;

    /**
     * 修改人
     */
    @Schema(description = "修改人")
    private String editor;

    /**
     * 修改时间
     */
    @Schema(description = "修改时间")
    private Date editTime;

    /************非数据库字段 start ************/
    private DeviceDto deviceDto;

    private AlarmEventConfigDto alarmEventConfigDto;

    /**
     * 关闭工单的用户
     */
    @Schema(description = "手动关联工单的用户")
    private Long manualCloseEventRecordSysUserId;

    /************非数据库字段 end **************/
}
